<%-- 
    Document   : update_service
    Created on : Sep 2, 2013, 1:08:50 PM
    Author     : hb
--%>

<%@page import="java.sql.ResultSet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>UPDATE SERVICE</title>
        <link rel="stylesheet" type="text/css" href="css/style.css"/>
         <style type="text/css">
            table.styletable{
                font-family: verdana,Times New Roman,sans-serif;
                font-size:11px;
                width: 100%;
                color:black;
            
            }
            table.styletable td {
                background:#ff99ff;
              
                padding: 8px;
                
            }
            h1{
                color: white;
            }
        </style>
         <script>
            function test()
            {
                var select_edition = frmupcharges.txtselect.value;
                var post_your = frmupcharges.txtpost.value;
                  var payment = frmupcharges.txtpayment.value;

                if (select_edition === "")
                {
                    alert('select not be empty');
                    frmupcharges.txtselect.focus();
                    return false;
                }

                else if (post_your === "")
                {
                    alert('post not be empty');
                    frmupcharges.txtpost.focus();
                    return false;
                }
                else if (payment === "")
                {
                    alert('post not be empty');
                    frmupcharges.txtpayment.focus();
                    return false;
                }
                
                else if (isNaN(payment))
                {
                    alert('payment  is number');
                    frmupcharges.txtpayment.focus();
                    return false;

                }
                return true;

            }
        </script>
    </head>
    
    <body>
        <p><h1  align="center" class="h1">Update Services</h1></p
         <%
            ResultSet rs = (ResultSet) session.getAttribute("update_data");
        %>
        
        <form id="fr" name="frmupcharges"action="updateServices" method="POST">
            <table class="styletable">
                <%
                        while (rs.next()) {
                    %>
                <tr>
                    <td align="right">Id_services :</td>
                    <td><input type="text" align="left" name="txtid" class="gwt-TextBox" value="<%out.println(rs.getInt("id_services")); %>" readonly="true" /></td>
                </tr>
                <tr>
                    <td align="right">Select_edition</td>
                    <td><input type="text" name="txtselect" align="left" class="gwt-TextBox" value="<%out.println(rs.getString("select_edition").toString()); %>" /></td>
                </tr>
                <tr>
                    <td align="right">Post_your</td>
                    <td><input type="text" name="txtpost" align="left" class="gwt-TextBox" value="<%out.println(rs.getString("post_your").toString()); %>" /></td>
                </tr>
                <tr>
                    <td align="right">Payment</td>
                    <td><input type="text" name="txtpayment" align="left" class="gwt-TextBox" value="<%out.println(rs.getString("payment").toString()); %>" /></td>
                </tr>
                <%
                        }
                %>
                <tr>
                    <td align="right"><input type="submit" value="Submit" class="gwt-Button" name="btnSub" onclick="return test();"/></td>
                    <td align="left"><input type="reset" value="Reset" class="gwt-Button" name="btnReset" /></td>
                </tr>
                
            </table>
        </form>
       
    </body>
</html>
